// Copyright (c) Microsoft Corporation. 
// Licensed under the MIT license.

#pragma once

#include "CoreMinimal.h"
#include "Framework/MultiBox/MultiBoxExtender.h"
#include "Delegates/Delegate.h"

class ULODRecipe;
class SWidget;
struct FAssetData;

class FLODRecipeEditorToolbarExtender : public FExtender
{
public:
	explicit FLODRecipeEditorToolbarExtender(ULODRecipe* InLODRecipe, const FSimpleDelegate& OnAddMeshes);

private:
	void CreateToolbarButtons(FToolBarBuilder& ToolbarBuilder);
	
	/** Mesh picker */
	TSharedRef<SWidget> CreateMeshPickerWidget();
	void OnMeshSelected(const FAssetData& AssetData);
	void CloseMenu();
	/** End Mesh picker */

	/** Build */
	void OnGenerateLODs();

private:
	FSimpleDelegate OnAddMeshesDelegate;

	ULODRecipe* LODRecipe;

};
